<template>
  <div class="row">
    <!-- 遍历渲染 -->
    <Item
      v-for="todo of todoList"
      :key="todo.id"
      v-bind="todo"
      @deleteTodoHandle="deleteTodoHandle"
      @changeDonehandle="changeDonehandle"
    />
  </div>
</template>

<script>
import Item from "./Item/Item.vue";
export default {
  name: "Main",
  components: { Item },
  props: ["todoList"],
  methods: {
    deleteTodoHandle(id) {
      this.$emit("deleteTodoHandle", id);
    },
    changeDonehandle(id) {
      this.$emit("changeDonehandle", id);
    },
  },
};
</script>

<style></style>
